For default and result values in the Excel add-in ("spec" and "result" types), EbsOpen properties of the objects can also be called, e. g. a default/result value "HTX_1.Description" sets/reads the text of the "Description" in the component named "HTX_1".
ATTENTION: The code after the object name is evaluated as a C# expression, which must be taken into account when specifying further arguments or further concatenation of properties.
In addition to the EbsScript evaluation type "expr" for results, there is also a type "assign" (or "assignment") with which values can be set before the calculation using EbsScript syntax. To do this, the EbsScript assignment operator ":=" and the value in the profile column are appended to the expression in the "Name" column. If the unit column contains the unit "String", the text is enclosed in inverted commas and any control characters are protected with backslashes.
Example:
Type |
Name |
Description |
Unit |
FirstProfile |
|
assign |
'@calcoptions.sim.waterSteamTable |
1 |
|||
assign |
P4.MEASM |
String |
P4.MEASM + 0.01 |
Please note the '-sign at the beginning of the upper expression to tell Excel that the cell content should be interpreted as text.
In this example, the EbsScript expression
@calcoptions.sim.waterSteamTable := 1
and for the second line the EbsScript expression
P4.MEASM := “P4.MEASM + 0.01“
are executed. In the second line, the expression "P4.MEASM + 0.01" is set for the spec value "MEASM" for component 46 named "P4".
Note: Please note that most of the object properties that can be written using EbsOpen properties or EbsScript assignment are non-profile-dependent values (such as "description"). This means that if such a value is written in a profile, it has the same value in all other profiles.